Skip to content

fix: add ",z" SELinux relabel to CA cert bind mounts#21

Open
cfis wants to merge 1 commit into
onecli:mainfrom
cfis:fix/selinux-relabel-flag
Open

fix: add ",z" SELinux relabel to CA cert bind mounts#21
cfis wants to merge 1 commit into
onecli:mainfrom
cfis:fix/selinux-relabel-flag

Conversation

@cfis
Copy link
Copy Markdown

@cfis cfis commented May 1, 2026

On SELinux-enforcing hosts (e.g. Fedora + rootless podman), bind-mounted CA cert files keep their host label (user_tmp_t) and the container process can't read them — surfacing as "self-signed certificate detected" or "error setting certificate file" inside containers spawned via applyContainerConfig.

Appending ,z (shared SELinux relabel) to the two -v mounts lets podman relabel the cert files to container_file_t at mount time. I think this is a no-op on macOS and non-SELinux Linux, so is safe to apply unconditionally.

@cfis cfis force-pushed the fix/selinux-relabel-flag branch from 447f540 to 6eed5da Compare May 19, 2026 05:54
@cfis
Copy link
Copy Markdown
Author

cfis commented May 19, 2026

Rebased to current main (v1.0.0+). The fix still applies cleanly — only the bind-mount flag tuple changes. ,z is a no-op on non-SELinux hosts (Docker on macOS, plain Linux without enforcing policy), and on Fedora rootless podman it relabels the cert from user_home_t to container_file_t so the container can actually read it. Verified end-to-end against an unprivileged install today; happy to address any review feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant